package org.suze.demo.facade;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.suze.demo.converter.StudentVoConverter;
import org.suze.demo.entity.Student;
import org.suze.demo.form.StudentForm;
import org.suze.demo.service.StudentService;
import org.suze.demo.vo.StudentVo;
import org.suze.framework.base.BaseConverter;
import org.suze.framework.base.impl.BaseFacadeImpl;

/**
 * @description:
 * @Date : 2020/6/16 21:39
 * @Author : Seig Heil
 */
@Component
public class StudentFacade extends BaseFacadeImpl<StudentVo,Student,Integer,StudentForm> {

    @Autowired
    StudentService studentService;

    @Override
    protected boolean isModify(Student record) {
        return null != record.getId();
    }

    @Override
    protected BaseConverter<StudentVo, Student> converter() {
        return new StudentVoConverter();
    }
}
